import {messages, queryCurrencyPrecision} from "share/common";
import moment from "moment/moment";
import selectedImg from 'images/financial-management/selected.png'

export default {
  planeColumns(filterMoney) {
    return [
      {
        /*账户ID*/
        title: messages('financial-management.key709')/*账户ID*/,
        key: "accountId",
        dataIndex: 'accountId',
        width: 120,
      },
      // {
      //   title: messages('financial-management.key343')/*公司名称*/,
      //   key: "companyName",
      //   dataIndex: 'companyName',
      //   width: 120,
      // },
      {
        title: messages('financial-management.key710')/*批次*/,
        key: "accCheckBatchNo",
        dataIndex: 'accCheckBatchNo',
        width: 120,
      },
      {
        title: messages('financial-management.key859')/*结算ID*/,
        key: "recordId",
        dataIndex: 'recordId',
        width: 120,
      },
      {
        /*订单号*/
        title: messages('request.key110'/*订单号*/),
        key: "meiyaOrderNo",
        dataIndex: 'meiyaOrderNo',
        width: 120,
      },
      {
        title: '预定日期',
        key: "meiyaBookDate",
        dataIndex: 'meiyaBookDate',
        width: 120,
      },
      {
        title: '航班号',
        key: "meiyaFlightNo",
        dataIndex: 'meiyaFlightNo',
        width: 120,
      },
      {
        title: '票价',
        key: "meiyaPrice",
        dataIndex: 'meiyaPrice',
        width: 120,
      },
      {
        title: '税一/机建费',
        key: "meiyaTax",
        dataIndex: 'meiyaTax',
        width: 120,
      },
      {
        title: '税二/燃油费',
        key: "meiyaOilFee",
        dataIndex: 'meiyaOilFee',
        width: 120,
      },
      {
        title: '应收合计',
        key: "meiyaAmount",
        dataIndex: 'meiyaAmount',
        width: 120,
      },
      {
        title: '汇联易订单号',
        key: "orderNo",
        dataIndex: 'orderNo',
        width: 120,
      },
      {
        title: '电子客票号码',
        key: "ticketNo",
        dataIndex: 'ticketNo',
        width: 120,
      },
      {
        title: '是否三方协议',
        key: "isPolicy",
        dataIndex: 'isPolicy',
        width: 120,
        render: (value) => {
          const keyValObj = {T: '是', F: '否'};
          return keyValObj[value] || value;
        }
      },
      {
        title: '经济舱标准价',
        key: "standardPrice",
        dataIndex: 'standardPrice',
        width: 120,
      },
      {
        title: '折扣',
        key: "rate",
        dataIndex: 'rate',
        width: 120,
      },
      {
        title: '飞行时长',
        key: "flightTime",
        dataIndex: 'flightTime',
        width: 120,
      },
      {
        title: '舱等RC',
        key: "reason",
        dataIndex: 'reason',
        width: 120,
      },
      {
        title: '舱等RC描述',
        key: "reasonDesc",
        dataIndex: 'reasonDesc',
        width: 120,
      },
      {
        title: '费用承担公司编号',
        key: "companyCode",
        dataIndex: 'companyCode',
        width: 120,
      },
      {
        title: '费用承担公司名称',
        key: "companyName",
        dataIndex: 'companyName',
        width: 120,
      },

      {
        title: '费用承担部门编号',
        key: "departmentCode",
        dataIndex: 'departmentCode',
        width: 120,
      },
      {
        title: '费用承担部门名称',
        key: "departmentName",
        dataIndex: 'departmentName',
        width: 120,
      },
      {
        title: '申请单日期',
        key: "businessDate",
        dataIndex: 'businessDate',
        width: 120,
      },
      {
        title: '供应商',
        key: "vendor",
        dataIndex: 'vendor',
        width: 120,
      },
      {
        title: '申请人工号',
        key: "bookerCode",
        dataIndex: 'bookerCode',
        width: 120,
      },
      {
        title: '申请人姓名',
        key: "bookerName",
        dataIndex: 'bookerName',
        width: 120,
      },
      {
        title: '申请人公司编号',
        key: "bookerCompanyCode",
        dataIndex: 'bookerCompanyCode',
        width: 120,
      },
      {
        title: '申请人公司名称',
        key: "bookerCompanyName",
        dataIndex: 'bookerCompanyName',
        width: 120,
      },
      {
        title: '申请人部门',
        key: "bookerDepartmentName",
        dataIndex: 'bookerDepartmentName',
        width: 120,
      },
      {
        title: '乘机人',
        key: "passengerName",
        dataIndex: 'passengerName',
        width: 120,
      },
      {
        title: '乘机人工号',
        key: "passengerCode",
        dataIndex: 'passengerCode',
        width: 120,
      },
      {
        title: '乘机人公司',
        key: "passengerCompanyName",
        dataIndex: 'passengerCompanyName',
        width: 120,
      },
      {
        title: '乘机人部门',
        key: "passengerDepartmentName",
        dataIndex: 'passengerDepartmentName',
        width: 120,
      },
      {
        title: '审批人',
        key: "finalAudit",
        dataIndex: 'finalAudit',
        width: 120,
      },
      {
        title: '国内/国际',
        key: "flightClass",
        dataIndex: 'flightClass',
        width: 120,
      },
      {
        title: '订单状态',
        key: "orderStatus",
        dataIndex: 'orderStatus',
        width: 120,
      },
      {
        title: '订单日期',
        key: "orderDate",
        dataIndex: 'orderDate',
        width: 120,
      },
      {
        title: '汇联易出票航班号',
        key: "flightNo",
        dataIndex: 'flightNo',
        width: 120,
      },
      {
        title: '订单类型',
        key: "orderType",
        dataIndex: 'orderType',
        width: 120,
      },
      {
        title: '到达时间',
        key: "arrivalTime",
        dataIndex: 'arrivalTime',
        width: 120,
      },
      {
        title: '出发城市名称',
        key: "departureCityName",
        dataIndex: 'departureCityName',
        width: 120,
      },
      {
        title: '到达城市名称',
        key: "arrivalCityName",
        dataIndex: 'arrivalCityName',
        width: 120,
      },
      {
        title: '出发机场名称',
        key: "orgAirportName",
        dataIndex: 'orgAirportName',
        width: 120,
      },
      {
        title: '到达机场名称',
        key: "dstAirportName",
        dataIndex: 'dstAirportName',
        width: 120,
      },
      {
        title: '审批日期',
        key: "finalAuditDate",
        dataIndex: 'finalAuditDate',
        width: 120,
      },
      {
        title: '审批净价',
        key: "bufferRecordPrice",
        dataIndex: 'bufferRecordPrice',
        width: 120,
      },
      {
        title: '审批民航基金/税',
        key: "bufferRecordTax",
        dataIndex: 'bufferRecordTax',
        width: 120,
      },
      {
        title: '审批燃油费',
        key: "bufferRecordOilFee",
        dataIndex: 'bufferRecordOilFee',
        width: 120,
      },
      {
        title: '审批服务费',
        key: "bufferRecordServiceFee",
        dataIndex: 'bufferRecordServiceFee',
        width: 120,
      },
      {
        title: '审批总价',
        key: "bufferRecordAmount",
        dataIndex: 'bufferRecordAmount',
        width: 120,
      },
      {
        title: '出票净价',
        key: "ticketPrice",
        dataIndex: 'ticketPrice',
        width: 120,
      },
      {
        title: '汇联易出票民航基金/税',
        key: "tax",
        dataIndex: 'tax',
        width: 120,
      },
      {
        title: '汇联易出票燃油费',
        key: "oilFee",
        dataIndex: 'oilFee',
        width: 120,
      },
      {
        title: '汇联易出票服务费',
        key: "serviceFee",
        dataIndex: 'serviceFee',
        width: 120,
      },
      {
        title: '汇联易改签费',
        key: "rebookFee",
        dataIndex: 'rebookFee',
        width: 120,
      },
      {
        title: '汇联易退票费',
        key: "refundFee",
        dataIndex: 'refundFee',
        width: 120,
      },
      {
        title: '汇联易改/退服务费',
        key: "rebookServiceFee",
        dataIndex: 'rebookServiceFee',
        width: 120,
      },
      {
        title: '重复对账',
        key: "flag",
        dataIndex: 'flag',
        width: 120,
      },
      {
        title: '出票对账结果',
        key: "amountFlag",
        dataIndex: 'amountFlag',
        width: 120,
      },
      {
        title: '审批对账结果',
        key: "approveFlag",
        dataIndex: 'approveFlag',
        width: 120,
      },
      {
        title: '变动类型',
        key: "changeFlag",
        dataIndex: 'changeFlag',
        width: 120,
      },
      {
        title: 'Buffer比率',
        key: "bufferRate",
        dataIndex: 'bufferRate',
        width: 120,
      },
      {
        title: 'Buffer',
        key: "buffer",
        dataIndex: 'buffer',
        width: 120,
      },
      {
        /*结算日期*/
        title: messages('financial-management.key41'/*结算日期*/),
        key: "createTime",
        dataIndex: 'createTime',
        width: 120,
        render: (value) => moment(value).format('YYYY-MM-DD')
      },
      {
        /*操作类型*/
        title: messages('financial-management.key860')/*操作类型*/,
        key: "orderDetailType",
        dataIndex: 'orderDetailType',
        width: 120,
      },
      {
        /*支付类型*/
        title: messages('financial-management.key60'/*支付类型*/),
        key: "unityPayType",
        dataIndex: 'unityPayType',
        width: 120,
      },
      {
        title: messages('financial-management.key926')/*导入渠道*/,
        key: "dataFrom",
        dataIndex: 'dataFrom',
        width: 120,
      },
      // {
      //   title: messages('financial-management.key856')/*消费商名称*/,
      //   key: "vendor",
      //   dataIndex: 'vendor',
      //   width: 120,
      // },
      {
        title: messages('financial-management.key822')/*预订人姓名*/,
        key: "bookerName",
        dataIndex: 'bookerName',
        width: 120,
      },
      {
        /*机票票号*/
        title: messages('financial-management.key876')/*机票票号*/,
        key: "tickerNo",
        dataIndex: 'tickerNo',
        width: 120,
      },
      // {
      //   /*国内国际*/
      //   title: messages('financial-management.key792')/*国内/国际*/,
      //   key: "internationalType",
      //   dataIndex: 'internationalType',
      //   width: 120,
      // },
      {
        /*往返类型*/
        title: messages('financial-management.key718')/*往返类型*/,
        key: "tripType",
        dataIndex: 'tripType',
        width: 120,
      },
      {
        title: messages('financial-management.key877')/*乘客姓名*/,
        key: "passengerName",
        dataIndex: 'passengerName',
        width: 120,
      },
      {
        title: messages('financial-management.key878')/*乘客工号*/,
        key: "employeeID",
        dataIndex: 'employeeID',
        width: 120,
      },
      {
        title: messages('financial-management.key866')/*应付金额*/,
        key: "amount",
        dataIndex: 'amount',
        width: 120,
        render: value => filterMoney(value, queryCurrencyPrecision())
      },
      {
        /*票面价*/
        title: messages('financial-management.key772')/*票面价*/,
        key: "price",
        dataIndex: 'price',
        width: 120,
      },
      {
        /*服务费*/
        title: messages('financial-management.key712')/*服务费*/,
        key: "meiyaServiceFee",
        dataIndex: 'meiyaServiceFee',
        width: 120,
      },
      // {
      //   /*民航基金*/
      //   title: messages('financial-management.key713')/*民航基金*/,
      //   key: "tax",
      //   dataIndex: 'tax',
      //   width: 120,
      // },
      // {
      //   /*燃油费*/
      //   title: messages('financial-management.key714')/*燃油费*/,
      //   key: "oilFee",
      //   dataIndex: 'oilFee',
      //   width: 120,
      // },
      {
        /*保险费*/
        title: messages('my-account.key224')/*保险费*/,
        key: "insuranceFee",
        dataIndex: 'insuranceFee',
        width: 120,
      },
      {
        title: messages('financial-management.key879')/*机票配送费*/,
        key: "sendTicketFee",
        dataIndex: 'sendTicketFee',
        width: 120,
      },
      {
        /*配送服务费*/
        title: messages('financial-management.key795')/*配送服务费*/,
        key: "itineraryFee",
        dataIndex: 'itineraryFee',
        width: 120,
      },
      {
        /*改签费*/
        title: messages('financial-management.key774')/*改签费*/,
        key: "meiyaRebookFee",
        dataIndex: 'meiyaRebookFee',
        width: 120,
      },
      {
        /*改签服务费*/
        title: messages('financial-management.key715')/*改签服务费*/,
        key: "reBookingServiceFee",
        dataIndex: 'reBookingServiceFee',
        width: 120,
      },
      {
        /*退票费*/
        title: messages('financial-management.key773')/*退票费*/,
        key: "meiyaRefundFee",
        dataIndex: 'meiyaRefundFee',
        width: 120,
      },
      {
        /*退票服务费*/
        title: messages('financial-management.key716')/*退票服务费*/,
        key: "refundServiceFee",
        dataIndex: 'refundServiceFee',
        width: 120,
      },
      {
        /*后收服务费*/
        title: messages('financial-management.key803')/*后收服务费*/,
        key: "postServiceFee",
        dataIndex: 'postServiceFee',
        width: 120,
      },
      {
        title: messages('common.currency')/*币种*/,
        dataIndex: 'currency',
        key: 'currency',
        width: 120,
      },
      {
        title: messages('financial-management.key880')/*佣金返还*/,
        dataIndex: 'returnCommissionFee',
        key: 'returnCommissionFee',
        width: 120,
      },
      {
        /*出发城市*/
        title: messages('financial-management.key47'/*出发城市*/),
        key: "dcityName",
        dataIndex: 'dcityName',
        width: 120,
      },
      {
        /*到达城市*/
        title: messages('financial-management.key48'/*到达城市*/),
        key: "acityName",
        dataIndex: 'acityName',
        width: 120,
      },
      {
        /*起飞时间*/
        title: messages('financial-management.key49'/*起飞时间*/),
        key: "takeOffTime",
        dataIndex: 'takeOffTime',
        width: 120,
      },
      {
        title: messages('financial-management.key881')/*航司名称*/,
        dataIndex: 'airlineName',
        key: 'airlineName',
        width: 120,
      },
      // {
      //   /*航班号*/
      //   title: messages('request.key76'/*航班号*/),
      //   key: 'flightNo',
      //   dataIndex: 'flightNo',
      //   width: 120,
      // },
      {
        /*舱等*/
        title: messages('setting.key706'/*舱等*/),
        key: "cabinName",
        dataIndex: 'cabinName',
        width: 120,
      },
      {
        /*行程单打印状态*/
        title: messages('financial-management.key805')/*行程单打印状态*/,
        key: "printStatus",
        dataIndex: 'printStatus',
        width: 120,
      },
      {
        /*行程单打印时间*/
        title: messages('financial-management.key806')/*行程单打印时间*/,
        key: "printTime",
        dataIndex: 'printTime',
        width: 160,
      },
      {
        title: messages('financial-management.key871')/*订单成本中心1*/,
        key: "costCenter",
        dataIndex: 'costCenter',
        width: 120,
      },
      {
        title: messages('financial-management.key872')/*订单成本中心2*/,
        key: "costCenter2",
        dataIndex: 'costCenter2',
        width: 120,
      },
      {
        title: messages('financial-management.key873')/*订单成本中心3*/,
        key: "costCenter3",
        dataIndex: 'costCenter3',
        width: 120,
      },
      {
        title: messages('financial-management.key874')/*备注1*/,
        key: "defineFlag",
        dataIndex: 'defineFlag',
        width: 120,
      },
      {
        title: messages('financial-management.key875')/*备注2*/,
        key: "defineFlag2",
        dataIndex: 'defineFlag2',
        width: 120,
      },
      {
        /*是否超标*/
        title: messages('financial-management.key793')/*是否超标*/,
        key: "excessive",
        dataIndex: 'excessive',
        width: 120,
        render: value => value === true ? messages('financial-management.key316')/*是*/ : value === false ? messages('financial-management.key317')/*否*/ : '',
      },
      {
        /*超标原因*/
        title: messages('financial-management.key794')/*超标原因*/,
        key: "reasonRemark",
        dataIndex: 'reasonRemark',
        width: 120,
      },
      {
        /*机票使用状态*/
        title: messages('financial-management.key804')/*机票使用状态*/,
        key: "ticketStatus",
        dataIndex: 'ticketStatus',
        width: 120,
      },
      {
        title: messages('financial-management.key867')/*行程号*/,
        key: "journeyId",
        dataIndex: 'journeyId',
        width: 120,
      },
      {
        title: messages('financial-management.key171')/*申请单号*/,
        key: "businessCode",
        dataIndex: 'businessCode',
        width: 120,
      },
      // todo 申请单名称
      // todo 乘机人
      // todo 行程类型
      // todo 申请出发城市
      // todo 申请到达城市
      // todo 出发日期
      // todo 返回日期
      // todo 部门
    ];
  },
}
